package lib

import (
	"xian-server/features"
	"xian-server/gen"

	"github.com/gin-gonic/gin"
)

func InitRouter() *gin.Engine {
	r := gin.Default()

	// 代码生成路由
	genRouter := r.Group("/api")
	gen.InitGenRoutes(genRouter)

	// 个性化路由
	featureRouter := r.Group("/")
	features.InitFeaturesRoutes(featureRouter)
	return r
}
